<template>
<van-tabs v-model:active="activeName">
  <van-tab v-for="item in list"
  :key="item.id"
   :title="item.text"
    ></van-tab>
 
</van-tabs>
</template>

<script setup lang="ts">
import { ref } from '@vue/reactivity'
import axios from 'axios'

interface INavItem{
    id:string
    text:string
}

const activeName = ref(0)
const list = ref<INavItem[]>([])

axios({
    url:'/navList',
    method:'get'
}).then(res => {
    list.value = res.data.result
    
})
</script>

<style lang='less' scoped>

</style>